<script setup>
   import { ref } from 'vue';

   const car = ref('劳斯莱斯')
   const logMsg = ()=>{
    alert('hello')
   }

   // 暴露出属性和方法给外部使用
   defineExpose({
    car,
    logMsg
   })
</script>


<template>
  <div>子组件</div>
</template>

<style scoped></style>
